package com.sujiewon.salesadmin.common.util;

public class StringUtil {
	
	public static int stringToNumber(String strNumber){
		int retNumber = 0;
		
		try{
			if(strNumber != null && !strNumber.isEmpty()){
				retNumber = Integer.parseInt(strNumber);
			}
		} catch(Exception e){
			e.printStackTrace();
			retNumber = 0;
		}
		
		return retNumber;
	}
	
	public static long stringToCurrency(String strNumber){
		long retNumber = 0;
		
		try{
			if(strNumber != null && !strNumber.isEmpty()){
				retNumber = Long.parseLong(strNumber);
			}
		} catch(Exception e){
			e.printStackTrace();
			retNumber = 0;
		}
		
		return retNumber;
	}
}
